package com.sunday.authorization.security.authorization.redis.mixin;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.sunday.authorization.security.authorization.redis.deserializer.CustomUserDeserializer;
import org.springframework.security.jackson2.CoreJackson2Module;

/**
 * @author sunday
 * @see org.springframework.security.jackson2.UserMixin
 * @see org.springframework.security.jackson2.UserDeserializer
 * @see CoreJackson2Module#setupModule(Module.SetupContext)
 * @since 2024/9/9
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
@JsonDeserialize(using = CustomUserDeserializer.class)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
        isGetterVisibility = JsonAutoDetect.Visibility.NONE)
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class CustomUserMixin {

}
